Fall back to installed lower-scope SDK versions when higher-priority config is missing#661
Open
Fall back to installed lower-scope SDK versions when higher-priority config is missing#661
Conversation
Agent-Logs-Url: https://github.com/version-fox/vfox/sessions/f9ac9663-b05f-43e1-aa20-4abf8b1e5255 Co-authored-by: bytemain <13938334+bytemain@users.noreply.github.com>
Agent-Logs-Url: https://github.com/version-fox/vfox/sessions/f9ac9663-b05f-43e1-aa20-4abf8b1e5255 Co-authored-by: bytemain <13938334+bytemain@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
bytemain
April 23, 2026 08:01
View session
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #661 +/- ##
==========================================
+ Coverage 24.09% 24.16% +0.07%
==========================================
Files 82 83 +1
Lines 7084 7104 +20
==========================================
+ Hits 1707 1717 +10
- Misses 5201 5209 +8
- Partials 176 178 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates SDK version resolution so that activate/env prefer the highest-priority installed configured version across scopes, instead of letting a higher-priority but missing version effectively remove the SDK from PATH.
Changes:
- Added
VfoxTomlChain.GetToolConfigsByPriority(name)to retrieve per-scope tool configs in priority order (Project → Session → Global). - Introduced shared installed-aware resolution helper (
resolveInstalledToolConfig) and integrated it intoactivateandenvsymlink/env generation paths. - Added unit test coverage for ordered per-scope config retrieval in
VfoxTomlChain.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/env/vfox_toml_chain.go | Adds ScopedToolConfig and GetToolConfigsByPriority for ordered multi-scope lookup. |
| internal/env/vfox_toml_chain_test.go | Adds test verifying priority ordering of tool configs across scopes. |
| cmd/commands/tool_resolution.go | New helper to pick the first installed configured version by scope priority. |
| cmd/commands/env.go | Switches envFlag path to installed-aware resolution (no longer trusts merged version when missing). |
| cmd/commands/activate.go | Switches activation symlink/env generation to installed-aware resolution. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A project-local
.vfox.tomlentry (e.g.golang = "1.24.0") currently overrides global config even when that version is not installed, which can removegofrom PATH inside the workspace. This change keeps scope priority while skipping uninstalled candidates and selecting the highest-priority installed configured version.Resolution behavior: prefer installed config by scope order
Project -> Session -> Global) and pick the first installed runtime.Activation/env pipeline integration
activateandenvcommand paths to use installed-aware resolution before symlink/env generation.Chain API support for ordered lookup
VfoxTomlChainwithGetToolConfigsByPriority(name)to return all scope configs for a tool from high to low priority.Targeted coverage